﻿using HECore.Common.Entitys;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace HECore.Account.Repository.Entites
{
    /// <summary>
    /// 账号表
    /// </summary>
    [Comment("账号表")]
    public class Account : AccountDeletionAudited
    {
        /// <summary>
        /// 账号Id
        /// </summary>
        [Key]
        [Comment("账号Id")]
        [Required]
        [Column(Order = 0)]
        public Guid Id { get; set; }

        /// <summary>
        /// 账号昵称
        /// </summary>
        [Comment("账号昵称")]
        [Required]
        [MaxLength(55)]
        [Column(Order = 1)]
        public string NickName { get; set; } = "";

        /// <summary>
        /// 账号头像
        /// </summary>
        [Comment("账号头像")]
        [MaxLength(255)]
        [Column(Order = 2)]
        public string? Avatar { get; set; }

        /// <summary>
        /// 账号手机
        /// </summary>
        [Comment("账号手机")]
        [MaxLength(11)]
        [Column(Order = 3)]
        public string? Mobile { get; set; }

        /// <summary>
        /// 账号邮箱
        /// </summary>
        [Comment("账号邮箱")]
        [MaxLength(32)]
        [Column(Order = 4)]
        public string? Email { get; set; }

        /// <summary>
        /// 账号密码
        /// </summary>
        [Comment("账号密码")]
        [Required]
        [MaxLength(32)]
        [Column(Order = 5)]
        public string Password { get; set; } = "";
    }
}
